package com.foryou.wechat.model.dto;

import com.foryou.wechat.utils.Validator;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by Lee.
 */

@Data
public class UserDTO {

    private int gender;
    private String nickname;
    private String avatarUrl;

    @NotBlank(message="用户生日不能为空")
    private String birthday;

    @NotBlank(message="地区不能为空")
    private String region;

    private String province;

    @NotNull(message="身份不能为空")
    private Integer capacity;

    @NotNull(message="用户手机号码不能为空")
    @Pattern(regexp= Validator.REGEX_MOBILE,message="用户手机号码格式不正确")
    @Length(min=11,max = 11,message="手机号必须为11位")
    private String phone;

    @NotBlank(message="用户微信号不能为空")
    @Length(min=2,max = 30,message="微信号长度必须位于2到30位之间")
    private String weChat;

    private String weibo;

}
